/**
 * @可开票订单
 */
export const InvoicableOrdersCloums = [
  { label: '订单编号', prop: 'c_order_uid', width: '160', type: 'custom' },
  { label: '买方', prop: 'customer_name', width: '180', type: ''},
  { label: '结算组织', prop: 'sales_org_name', width: '220',},
  { label: '采购数量', prop: 'sales_num', width: '100', type: 'number', isSort: true },
  { label: '采购金额', prop: 'discount_amount', width: '100', type: 'money', isSort: true },
  { label: '开票类型', prop: 'invoice_name', width: '140', type: '', isSort: true },
  { label: '开票状态', prop: 'status_str', width: '100', type: 'custom', isSort: true },
  { label: '开票申请人', prop: 'create_user_name', width: '180',},
  { label: '开票申请时间', prop: 'created_at', type: '', width: '160'},
  { label: '发票链接', prop: 'img_path', width: '120', type: '' },
]
/**
 * @可开票订单-详情
 */
export const InvoicableDetailCloums = [
  { label: '开票金额', prop: 'amount', width: '120', type: 'money' },
  { label: '开票类型', prop: 'invoice_type', width: '140', type: '' },
  { label: '发票抬头', prop: 'invoice_title', width: '120', type: '' },
  { label: '公司税号', prop: 'tax_register_code', width: '120' },
  { label: '开户银行', prop: 'invoice_bank_name', width: '160', },
  { label: '银行账号', prop: 'invoice_bank_account', width: '120', type: '' },
]


// 开票类型
export const InvoicableType =  [
  { value: '1', label: '增值税专用发票' },
  { value: '2', label: '普通发票' },
  { value: '3', label: '不需要开票' },
]

// 开票类型对应名称
export const ReturnInvoicableLabel = (value: string | number)=>{

  const str = value.toString()

  const row = InvoicableType.filter((item:any)=>{
    if (item.value == str) return item
  })

  return row[0].label

}
